import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '@/views/HomeView.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      redirect: '/home',
      component: HomeView,
      children: [
        {
          path: '/home',
          name: 'home',
          component: () => import('@/views/page/homePage.vue')
        },


        {
          path: '/myPhoto',
          name: 'myPhoto',
          component: () => import('@/views/page/myPhoto.vue')
        },
        {
          path: '/myMessage',
          name: 'myMessage',
          component: () => import('@/views/page/Guestbook.vue')
        },
        {
          path: '/management',
          meta: {
            isAuth: true,
          },
          name: 'management',
          component: () => import('@/views/page/artManagement.vue'),
        },
        {
          path: '/managementTab',
          name: 'managementTab',
          component: () => import('@/views/page/managementTab.vue')
        },
        {
          path: '/artDetail',
          name: 'artDetail',
          component: () => import('@/views/page/articleDetail.vue')
        },
        {
          path: '/recompose',
          name: 'recompose',
          component: () => import('@/views/page/recompose.vue')
        },
      ]
    },

  ]
})

export default router
